package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.server.DemoServer;

@RestController
public class HelloConsumer {
	@Reference(url = "dubbo://192.168.1.100:20880")
	private DemoServer demoServer;
	
	
	@GetMapping("/hello")
	public String sayHello(String name) {
		return demoServer.sayHello(name);
	}
}
